package singleton.demo1;

/**
 * 懒汉模式
 * 有线程安全问题
 */
public class XieFactory {
    private  static XieFactory factory;
    
    private String name = "鞋厂";

    private XieFactory() {
        
    }
    public static XieFactory getInstance() {
        if (factory == null) {
            factory = new XieFactory();

        }
        return factory;
    }
    
}
